﻿using com.fmtx.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.fmtx.IDal;
using com.fmtx.Dal;

namespace com.fmtx.Dal
{
    public class ArticleTypeServer:BaseServer<ArticleType>,IArticleType
    {
        public new bool Delete(int id)
        {
            ArticleServer ass = new ArticleServer();
            var alist = ass.Query(id);
            foreach (var item in alist)
            {
                ass.Delete(item.Id);
            }
            return base.Delete(id);
        }

        public IList<ArticleType> Query(int uid)
        {
            return db.AllList(w => w.Uid == uid).ToList();
        }
    }
}
